package tree;

/**
 * @author dx
 * @version 1.0
 * @date 2022/5/10 10:49
 * @description:   二叉树的深度
 */
public class Tree_Deep {
    public int TreeDepth(TreeNode node){
        int left = TreeDepth(node.left);
        int right = TreeDepth(node.right);
        return Math.max(left,right)+1;
    }
}
